import time
from po_126mail.Base.Base import Base
from selenium.webdriver.common.by import By

class Page1(Base):
    # //*[@id="x-URS-iframe1756898422869.3335"]
    kj_loc = (By.XPATH,'//iframe[starts-with(@id,"x-URS-iframe175")]')
    def kj(self):
        self.iframe(self.kj_loc)

    username_loc = (By.NAME,'email')
    def username(self):
        self.send_keys(self.username_loc,'s3080172040')

    password_loc = (By.NAME,'password')
    def password(self):
        self.send_keys(self.password_loc,'Xff030303')

    login_loc = (By.ID,'dologin')
    def login(self):
        self.click(self.login_loc)

    def login_01(self):
        self.open('https://mail.126.com/')
        self.kj()
        time.sleep(1)
        self.username()
        self.password()
        time.sleep(2)
        self.login()
        self.iframe_content()